import request from '@/utils/request'
export function createdArticle(data) {
  return request({
    url: 'api/v1/article/',
    method: 'post',
    data
  })
}

export function articleList(data) {
  return request({
    url: 'api/v1/article/',
    method: 'get',
    params: data
  })
}

export function getArticle(id) {
  return request({
    url: `api/v1/article/${id}/`,
    method: 'get'
  })
}

export function updateArticle(id, data) {
  return request({
    url: `api/v1/article/${id}/`,
    method: 'put',
    data
  })
}
